//
//  YLAddAdressHeader.m
//  YLFinanceService
//
//  Created by she1323 on 2017/9/8.
//  Copyright © 2017年 she1323. All rights reserved.
//  快速添加地址

#import "YLAddAdressHeader.h"

#import <Masonry.h>
@implementation YLAddAdressHeader

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setUp];
    }
    return self;
}

- (void)setUp
{
    self.backgroundColor = YLColor(94, 96, 107);
    __weak typeof(self) weakSelf = self;
    UILabel *titleLabel = [[UILabel alloc] init];
    titleLabel.textColor = [UIColor whiteColor];
    titleLabel.font = [UIFont systemFontOfSize:13.0f];
    [self addSubview:titleLabel];
    titleLabel.text = @"快速添加收货地址";
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(weakSelf).mas_offset(15);
        make.centerY.mas_equalTo(weakSelf);
    }];
    
    UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"toRightwhite"]];
    [self addSubview:imageView];
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(weakSelf).mas_offset(-10);
        make.centerY.mas_equalTo(weakSelf);
        make.height.mas_equalTo(15);
        make.width.mas_equalTo(18);
    }];
    imageView.contentMode = UIViewContentModeScaleAspectFit;
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] init];
    [self addGestureRecognizer:tap];
    
    _tapSignal = [tap rac_gestureSignal];
    

    
}


@end
